;;;Set custom linetypes (command-ltype) TDLT-TDL, TDRT-TDR, and SEDF-SEDFENCE
;;;Use TDLT to point left and TDRT to point right, then use PLREV.LSP to reverse them if they point the wrong way.
;;;
;;;	Author:
;;;		Henry C. Francis
;;;		425 N. Ashe Street
;;;		Southern Pines, NC 28387
;;;
;;;	http://www.paracadd.com/
;;;	All rights reserved.
;;;
(DEFUN C:TDLT ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "TDL")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 2.0 "")
  (COMMAND ".LAYER" "M" "CEEROC3TDLT" "C" 3 "CEEROC3TDLT" "LT" "TDL" "CEEROC3TDLT" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEEROC3TDLT" "")
;;;  (C:RSLAYR)
)
(DEFUN C:TDRT ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "TDR")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 2.0 "")
  (COMMAND ".LAYER" "M" "CEEROC3TDRT" "C" 3 "CEEROC3TDRT" "LT" "TDR" "CEEROC3TDRT" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEEROC3TDRT" "")
;;;  (C:RSLAYR)
)
(DEFUN C:ENKALT ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "ANSI37")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CEEROC1ENKA" "C" 1 "CEEROC1ENKA" "LT" "ANSI37" "CEEROC1ENKA" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEEROC1ENKA" "S" 1.0 "")
  (COMMAND ".PEDIT" IT "L" "ON" "")
;;;  (C:RSLAYR)
)
(DEFUN C:EXCELT ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "ANSI31")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CEEROC1EXCE" "C" 1 "CEEROC1EXCE" "LT" "ANSI31" "CEEROC1XCE" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEEROC1EXCE" "S" 1.0 "")
  (COMMAND ".PEDIT" IT "L" "ON" "")
;;;  (C:RSLAYR)
)
(DEFUN C:GRRT ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "GUARD_R")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CERAIL3GRRT" "C" 3 "CERAIL3GRRT" "LT" "GUARD_R" "CERAIL3GRRT" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CERAIL3GRRT" "S" 1.0 "")
  (COMMAND ".PEDIT" IT "L" "ON" "")
;;;  (C:RSLAYR)
)
(DEFUN C:GRLT ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "GUARD_L")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CERAIL3GRLT" "C" 3 "CERAIL3GRLT" "LT" "GUARD_L" "CERAIL3GRLT" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CERAIL3GRLT" "S" 1.0 "")
  (COMMAND ".PEDIT" IT "L" "ON" "")
;;;  (C:RSLAYR)
)
(DEFUN C:WDLNP ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "WOODSLINE")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CEWOOD4LINE" "C" 4 "CEWOOD4LINE" "LT" "WOODSLINE" "CEWOOD4LINE" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEWOOD4LINE" "S" 1.0 "")
  (COMMAND ".PEDIT" IT "L" "OFF" "")
;;;  (C:RSLAYR)
)
(DEFUN C:WDLNE ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "WOODSLINE")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CEWOOD1LINE" "C" 1 "CEWOOD1LINE" "LT" "WOODSLINE" "CEWOOD1LINE" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEWOOD1LINE" "S" 1.0 "")
  (COMMAND ".PEDIT" IT "L" "OFF" "")
;;;  (C:RSLAYR)
)
(SETQ C:WDLN C:WDLNE)
(DEFUN C:TREELN ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "TREELINE")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CETREE1LINE" "C" 1 "CETREE1LINE" "LT" "TREELINE" "CETREE1LINE" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CETREE1LINE" "S" 1.0 "")
  (COMMAND ".PEDIT" IT "L" "OFF" "")
;;;  (C:RSLAYR)
)
(DEFUN C:GLLT ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "GLL")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CEEROC3GLLT" "C" 3 "CEEROC3GLLT" "LT" "GLL" "CEEROC3GLLT" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEEROC3GLLT" "")
;;;  (C:RSLAYR)
)
(DEFUN C:GLRT ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "GLR")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "C-EROC3GLRT" "C" 3 "C-EROC3GLRT" "LT" "GLR" "C-EROC3GLRT" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "C-EROC3GLRT" "")
;;;  (C:RSLAYR)
)
(DEFUN C:SEDF ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
  (loadcustltype "SILTFENCE")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CEEROC3SEDF" "C" 3 "CEEROC3SEDF" "LT" "SILTFENCE" "CEEROC3SEDF" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEEROC3SEDF" "")
)
(DEFUN C:DBLSEDF ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
  (loadcustltype "DBLSILTFENCE")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CEEROC3SEDF-DUBL" "C" 3 "CEEROC3SEDF-DUBL" "LT" "DBLSILTFENCE" "CEEROC3SEDF-DUBL" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEEROC3SEDF-DUBL" "")
)
(DEFUN C:STREAM ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
  (loadcustltype "STREAMD")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CSWATR5FLOW" "C" 5 "CSWATR5FLOW" "LT" "STREAMD" "CSWATR5FLOW" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CSWATR5FLOW" "")
  (COMMAND ".PEDIT" IT "L" "ON" "")
)
(DEFUN C:WIREFE ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "WIREFENCE")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CEFENC7WIRE" "C" 7 "CEFENC7WIRE" "LT" "WIREFENCE" "CEFENC7WIRE" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEFENC7WIRE" "")
;;;  (C:RSLAYR)
)
(DEFUN C:WIREFP ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "WIREFENCE")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CEFENC3WIRE" "C" 3 "CEFENC3WIRE" "LT" "WIREFENCE" "CEFENC3WIRE" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEFENC3WIRE" "")
;;;  (C:RSLAYR)
)
(SETQ C:WIREF C:WIREFE)
(DEFUN C:WOODFE ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "WOODFENCE")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CEFENC7WOOD" "C" 7 "CEFENC7WOOD" "LT" "WOODFENCE" "CEFENC7WOOD" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEFENC7WOOD" "")
;;;  (C:RSLAYR)
)
(DEFUN C:WOODFP ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "WOODFENCE")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CEFENC3WOOD" "C" 3 "CEFENC3WOOD" "LT" "WOODFENCE" "CEFENC3WOOD" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEFENC3WOOD" "")
;;;  (C:RSLAYR)
)
(DEFUN C:TRACKS ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "TRACKS")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CERAIL7ROAD" "C" 7 "CERAIL7ROAD" "LT" "TRACKS" "CERAIL7ROAD" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CERAIL7ROAD" "")
;;;  (C:RSLAYR)
)
(DEFUN C:RRAP ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (loadcustltype "RIPRAP")
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CERRAP1SYMB" "C" 1 "CERRAP1SYMB" "LT" "RIPRAP" "CERRAP1SYMB" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CERRAP1SYMB" "")
;;;  (C:RSLAYR)
)
(DEFUN C:GEOT ()
;;;  (IF C:MKLAYR NIL (LOAD"MKLAYR" "File MKLAYR.LSP not found! "))
;;;  (C:SVLAYR)
  (SETQ IT (SSGET))
  (COMMAND ".CHANGE" IT "" "P" "LT" "BYLAYER" "S" 1.0 "")
  (COMMAND ".LAYER" "M" "CEEROC3FABR" "C" 3 "CEEROC3FABR" "LT" "CONTINUOUS" "CEEROC3FABR" "")
  (COMMAND ".CHANGE" IT "" "P" "LA" "CEEROC3FABR" "")
;;;  (C:RSLAYR)
)
(defun c:pltools ()
  (PRINC "\n\tTDLT & TDRT = Temporary DIversion, Left & Right ")
  (PRINC "\n\tGRLT & GRRT = Guard Rail, Left & Right ")
  (PRINC "\n\t     EXCELT = Excelsior Mat (in plan, as linetype) ")
  (PRINC "\n\t     ENKALT = Enka Mat (in plan, as linetype) ")
  (PRINC "\n\t       WDLN = Existing Woods Line ")
  (PRINC "\n\t      WDLNE = Existing Woods Line ")
  (PRINC "\n\t      WDLNP = Proposed Woods Line ")
  (PRINC "\n\t     TREELN = Tree Line ")
;;;  (PRINC "\n\tWDLT & WDRT = Woods Line, Left & Right ")
  (PRINC "\n\tGLLT & GLRT = Grass Lined Swale, Left & Right ")
  (PRINC "\n\t       SEDF = Sediment Fence")
  (PRINC "\n\t    DBLSEDF = Double Sediment Fence")
  (PRINC "\n\t      WIREF = Existing Wire Fence")
  (PRINC "\n\t     WIREFE = Existing Wire Fence")
  (PRINC "\n\t     WIREFP = Proposed Wire Fence")
  (PRINC "\n\t      WOODF = Existing Wood Fence")
  (PRINC "\n\t     WOODFE = Existing Wood Fence")
  (PRINC "\n\t     WOODFP = Proposed Wood Fence")
  (PRINC "\n\t       RRAP = Rip Rap (in profile, as linetype)")
  (PRINC "\n\t     STREAM = Stream Flowline")
  (PRINC "\n\t       GEOT = Geotechnical Fabric (in profile, as linetype)")
  (PRINC)
)
(DEFUN loadcustltype (ltname / )
  (IF initandsdichk NIL (LOAD "initandsdichk" "\nFile INITANDSDICHK.LSP not loaded! "))
  (IF (OR (NOT (TBLOBJNAME "STYLE" "SYMETEO"))(NOT (TBLOBJNAME "STYLE" "SYMAP")))
    (initandsdichk)
  )
;;;  (IF (NOT (TBLOBJNAME "STYLE" "SYMETEO"))
;;;    (IF (FINDFILE "SYMETEO.SHX")
;;;      (PROGN
;;;        (SETQ curtxtstyle (GETVAR "textstyle"))
;;;        (COMMAND "-style" "SYMETEO" "symeteo" 0 1.0 0 "N" "N" "N")
;;;        (SETVAR "TEXTSTYLE" curtxtstyle)
;;;      )
;;;    )
;;;  )
;;;  (IF (NOT (TBLOBJNAME "STYLE" "SYMAP"))
;;;    (IF (FINDFILE "SYMAP.SHX")
;;;      (PROGN
;;;        (SETQ curtxtstyle (GETVAR "textstyle"))
;;;        (COMMAND "-style" "SYMAP" "symap" 0 1.0 0 "N" "N" "N")
;;;        (SETVAR "TEXTSTYLE" curtxtstyle)
;;;      )
;;;    )
;;;  )
  (IF (TBLSEARCH "LTYPE" ltname)
    NIL
    (IF (OR custom_ltfile (SETQ custom_ltfile (FINDFILE "CUSTOM.LIN")))
      (PROGN
        (COMMAND "-LINETYPE" "L" ltname custom_ltfile "")
      )
      (PRINC "\nFile CUSTOM.LIN not found! ")
    )
  )
)